<!DOCUMENT HTML>

<html>

    <head><title>Relatório de Clientes</title></head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="css/default.css">
    <link rel="stylesheet" type="text/css" href="css/menu.css">
    <link rel="stylesheet" type="text/css" href="css/table.css">
    <body>
        <div id="container">
            <div id="title">
                <div id="img">
                    <img src="css/ico_car.png"/>
                </div>
                <div id="h1">
                    <h1>Park Control</h1>
                </div>
            </div>
            <div id="menu">
                <ul class="menu">
                    <li><a href="#" title="Cadastros">Cadastros</a>
                        <ul>
                            <li><a href="newCli.php" target="_parent" >Cadastrar Clientes</a></li>
                            <li><a href="newCar.php" target="_parent">Cadastrar Carros</a></li>
                            <li><a href="newFares.php" target="_parent">Cadastrar Tarifas</a></li>
                        </ul>
                    </li>
                    <li><a href="#" title="Gerenciar">Gerenciar</a>
                        <ul>
                            <li><a href="newPark.php" target="_parent">Entrada de Carros</a></li>
                            <li><a href="relExitPark.php" target="_parent">Saida de Carros</a></li>
                        </ul>
                    </li>
                    <li><a href="#" title="Relatorios">Relatorios</a>
                        <ul>
                            <li><a href="relCar.php" target="_parent">Relatório de Carros</a></li>
                            <li><a href="relCli.php" target="_parent">Relatório de Clientes</a></li>
                            <li><a href="relPark.php" target="_parent">Relatório de Entradas</a></li>    
                        </ul>
                    </li>
                </ul>
            </div>
            <table border="1">
                <thead>
                    <tr>
                        <th>Nome</th>
                        <th>Tel.</th>
                        <th id="th3">Data Nasc.</th>
                        <th>CPF</th>
                        <th>Cadastro</th>
                        <th>Opções</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    include 'action/SerchCustormers.action.php';
                    if ($clients) {
                        foreach ($clients as $c) {
                            ?>
                            <tr>
                                <td id="1"><?php echo $c->getName(); ?></td>
                                <td id="2"><?php echo $c->getPhone(); ?></td>
                                <td id="3"><?php echo $c->getBirth(); ?></td>
                                <td id="4"><?php echo $c->getDoc(); ?></td>
                                <td id="5"><?php echo $c->getDatCad(); ?></td>
                                <td id="7">
                                    <a href="newCli.php?id=<?php echo $c->getId(); ?>"><img src="css/ico_editar.png" /></a>&nbsp;
                                    <a href="action/DelCli.action.php?id=<?php echo $c->getId(); ?>"><img src="css/ico_excluir.png"/></a>&nbsp;
                                    <a href="tableAddress.php?idCli=<?php echo $c->getId(); ?>"><img src="css/ico_end.png"/></a>
                                </td>
                            </tr>
                            <?php
                        }
                    }else
                        echo"Nem um registro encontrado."
                        ?>
                </tbody>
            </table>
        </div>
    </body>
</html>
